package tank.draw;

import java.util.Vector;

/**
 * @Author: WaveKing
 * @Description: TODO
 * @Date: Created in 13:07 2023/11/11
 * @Modified By:
 */
public class tank {
    private int x; //x坐标
    private int y; //y坐标
    private int direct; //表示坦克方向
    private int speed = 1;//设置坦克速度
    Boolean isLive = true; //是否存活

    Vector<bullet> bullets = new Vector<>(); //创建子弹集合

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public void up(){
        y-=speed;
    }
    public void down(){
        y+=speed;
    }
    public void left(){
        x-=speed;
    }
    public void right(){
        x+=speed;
    }

    public void setDirect(int direct) {
        this.direct = direct;
    }

    public int getDirect() {
        return direct;
    }

    public tank(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }
}
